package cn.org.eshow.service;

import cn.org.eshow.bean.query.FavoriteQuery;
import cn.org.eshow.common.page.Page;
import cn.org.eshow.model.Favorite;
import cn.org.eshow.model.User;

import javax.jws.WebService;
import java.util.List;

@WebService
public interface FavoriteManager extends GenericManager<Favorite, Integer> {

    List<Favorite> list(FavoriteQuery query);

    Page<Favorite> search(FavoriteQuery query);

    Favorite check(FavoriteQuery query);

    Favorite save(Favorite favorite, User user);

    /**
     * 更新收藏信息是否可用
     *
     * @param favorite
     * @param user
     * @return
     */
    Favorite updateEnabled(Favorite favorite, User user);

}